import { GetProductType } from "../../api/goods"

const state = {
    categoryList: []
}

const mutations = {
    SET_CATERGORY(state, payload) {
        state.categoryList = payload
    }
}

const actions = {
    async fetchCategory({ commit }, params) {
        let { data } = await GetProductType(params);
        commit("SET_CATERGORY",data.dataSource)
    }
}

export default {
    namespaced: true,
    state,
    mutations,
    actions
}